public class Test7 {
    public static void main(String[] args) {
        int[] arr = {1,2,3,4,5,6};

        try {
            System.out.println(arr[0]);
            System.out.println(2/0);
            String s = null;
            System.out.println(s.equals("2"));
        }catch (ArrayIndexOutOfBoundsException e){
            System.out.println("索引越界异常");
        }catch (ArithmeticException e){
            System.out.println("除数不能为0");
        }catch (Exception e){
            System.out.println("Exception");
        }
    }
}
